/*
 * @Author: white_queen
 * @Date: 2024-07-17 16:34:33
 * @LastEditors: white_queen
 * @LastEditTime: 2024-07-18 14:51:16
 * @FilePath: /http/apis/mall.js
 * @Description: 商城模块接口
 */
import request from '../../utils/request.js'
const MallApi = {
	// 商品详情
	getDetail(params) {
		let data = {
			data: params,
		};
		return request("/api/index/goods_info", "POST", data)
	},
	// 首页分类
	getClassType(params) {
		let data = {
			data: params,
		};
		return request("/api/index/index", "POST", data)
	},
	// 分类列表
	getGoodsList(params) {
		let data = {
			data: params,
		};
		return request("/api/index/get_goods_list", "POST", data)
	},
	// 收藏商品
	GoodsCollect(params) {
		let data = {
			data: params,
		};
		return request("/api/index/collect", "POST", data)
	},
	// 根据规格id查询规格组合详情
	getPriceBySku(params) {
		let data = {
			data: params,
		};
		return request("/api/index/get_price_by_sku", "POST", data)
	},
	// 加入购物车
	joinCart(params) {
		let data = {
			data: params,
		};
		return request("/api/Cart/join_cart", "POST", data)
	},

}
export default MallApi